#
#  Weapons.py
#  TurnShip
#
#  Created by Pete Lord on 25/05/2009.
#  Copyright (c) 2009 Propellor and Ratchet Games. All rights reserved.
#
import Options, Effects, os
# theres no superclass for weapons due to the individuality of them all, but for
# a basic example look at FrontCannon, when implemented.

class PawnCannonA():
    """ Diagonally forward firing on both sides. """
    def __setup__(self, parent, ship_graphics):
        self.parent = parent # reference to the pawn/ship that owns the weapon.
        self.textures = ship_graphics[os.path.join("Data", "Weapons", "CannonA")]
        
    def fire(self):
        # show off the animations here.
        self.parent.entities.effects.add_higher(Effects.PawnCannonA(self.parent, self.textures))

class PawnCannonB():
    """ Diagonally forward firing on both sides. """
    def __setup__(self, parent, ship_graphics):
        self.parent = parent # reference to the pawn/ship that owns the weapon.
        self.textures = ship_graphics[os.path.join("Data", "Weapons", "CannonB")]
                
    def fire(self):
        # show off the animations here.
        self.parent.entities.effects.add_higher(Effects.PawnCannonB(self.parent, self.textures))

        
